/*
 * DTWX3Data.h
 * 
 *  Created on: 19.7.2011.
 *      Author: Hetcheem
 */

#ifndef DTWX3DATA_H_
#define DTWX3DATA_H_

/* 
 * class DTWX3Data
 * 
 * Represents the data to be sent to DTW's X3 vessel.
 *
 */
class DTWX3Data
{
private:
 	int m_left_motor;	    // PWM i.e. 500-2500 (0.5 ms -2.5 ms)
	int m_right_motor;      // PWM i.e. 500-2500 (0.5 ms -2.5 ms)
	float m_rear_motor;		// Power 0%-100%
	float m_rear_servo;	    // Angle (degrees)
    unsigned long m_numParsedSentences;
    unsigned long m_numGeneratedSentences;
public:
    // Constructor
	DTWX3Data();
    // Get
    const int& GetLeftMotor() { return m_left_motor;}
    const int& GetRightMotor() { return m_right_motor;}
    const float& GetRearMotor() { return m_rear_motor;}
    const float& GetRearServo() { return m_rear_servo;}
    const unsigned long& GetNumParsedSentences() { return m_numParsedSentences;}
    const unsigned long& GetNumGeneratedSentences() { return m_numGeneratedSentences;}
    // Set
    int SetLeftMotor(const int& value);
    int SetRightMotor(const int& value);
    int SetRearMotor(const float& value);
    int SetRearServo(const float& value);
    // Data handling
    int GenerateDTWX3(char *sentence);
    int ProcessDTWX3(char *sentence);
};

#endif /* DTWX3DATA_H_ */
